/**
 * 列表样式
 * @author xiaoxujs
 */

import { Button } from "antd";
import { ListStyleModuleBox } from "../../style";
import { IYckzZyLoadControlParamSetSetPlcVO } from "../../../../../type/remoteControl/loadingControlList";
import { FC } from "react";

const ListStyleModule: FC<{
    data?: IYckzZyLoadControlParamSetSetPlcVO,
    setPianyiliangSetShow: React.Dispatch<React.SetStateAction<boolean>>
}> = ({
    data,
    setPianyiliangSetShow
}) => {
        return <ListStyleModuleBox>
            <thead>
                <tr className="box-title-tr">
                    <th align='center'>IP地址</th>
                    <th align='center'>端口号</th>
                    <th align='center'>连接超时时间(毫秒)</th>
                    <th align='center'>读写超时时间(毫秒)</th>
                    <th align='center'>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr className="box-tr">
                    <td align='center'>{data && (data.plcIp || '--')}</td>
                    <td align='center'>{data && (data.plcPort || '--')}</td>
                    <td align='center'>{data && (data.plcConnectTime || '--')}</td>
                    <td align='center'>{data && (data.plcReadTime || '--')}</td>
                    <td align='center'>
                        <Button type="link" onClick={() => setPianyiliangSetShow(true)}>偏移量参数</Button>
                    </td>
                </tr>
            </tbody>

        </ListStyleModuleBox>
    }

export default ListStyleModule;